<?php

namespace app\common\model;

use think\Model;

class IntegralModel extends Model
{
    protected $name = 'integral';

    public function getUserData($where): array
    {
        return $this->where($where)->findOrEmpty()->toArray();
    }

    public function incNumber($where,int $num)
    {
        return $this->where($where)->inc('sum_num',$num)->inc('num',$num)->update();
    }
}